package org.edu.eece262.taskshare;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainMenu extends Activity {
	
	Button bTasks;
	Button bContacts;
	Button bGroups;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.mainmenu);
		
		bTasks = (Button) findViewById(R.id.bTasks);
		bContacts = (Button) findViewById(R.id.bContacts);
		bGroups = (Button) findViewById(R.id.bGroups);
		
		bTasks.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				startActivity(new Intent(getApplicationContext(),TaskShare.class)
				.putExtra("Username", getIntent().getStringExtra("Username")));
			}
		});
		
		bContacts.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				startActivity(new Intent(getApplicationContext(),Contacts.class)
				.putExtra("Username", getIntent().getStringExtra("Username")));
			}
		});
		
		bGroups.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				startActivity(new Intent(getApplicationContext(),Groups.class)
				.putExtra("Username", getIntent().getStringExtra("Username")));
			}
		});
	}

}
